home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / OS2 / V15N04.ZIP / WARPCA.ZIP / WCABSRC.ZIP / FILETOOL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-18  |  1.9 KB  |  49 lines

  1. // FILETOOL.H  -- Functions to manipulate files
  2. #if !defined(_FILETOOL_H)
  3.     #define _FILETOOL_H
  4. #include <owl\statusba.h>
  5.  
  6. // List of files in global template-based array.
  7. extern TISArrayAsVector <FILEENTRY> SelectedFileList;
  8. extern TISArrayAsVector <string> AllFilesList;
  9. // Dirs. that must be created (for copying, moving or renaming) or deleted for deleting.
  10. extern TISArrayAsVector <string> CriticalDirsList;
  11.  
  12. extern ULONG ulTotalFilesBytes;
  13.  
  14. extern TTextGadget *pGlobalStatusBar;
  15. extern TWindow *pGlobalParent;
  16.  
  17. // Confirmation options -- In WARPCAB.CPP
  18. extern int bConfirmReplace;
  19. extern int bConfirmAll;
  20.  
  21. typedef struct _FILEOPPARAM
  22. {
  23.     int nFileOp;
  24.     TTextGadget *pStatus;
  25.     HWND hwndStatus;
  26.     TWindow *pParent;
  27.     LPSTR lpszSourceDir;
  28.     LPSTR lpszTargetDir;
  29.     LPSTR lpszTargetFile;
  30. } FILEOPPARAM;
  31.  
  32. typedef FILEOPPARAM * PFILEOPPARAM;
  33. int CopyMoveFilePrimitive(TWindow *pParent, string& strDest, string& strSrc, int bIsCopy);
  34. int CopyOrMoveFiles(FILEOPPARAM *pParam);
  35. int DeleteFiles(FILEOPPARAM *pParam);
  36. LPSTR GetFileTimeStampAsString(LPSTR lpszDateTime, unsigned short int uFileDate, unsigned short int uFileTime);
  37. int LoadFilesInDir(LPSTR lpszThisDir, LPSTR lpszMask, ULONG ulAttrs, LPSTR lpszSourceDir);
  38. int CollectAllFilesInSelections(LPSTR lpszThisDir, LPSTR lpszMask, ULONG ulAttrs, LPSTR lpszSourceDir);
  39. BOOL DoesFileExist(LPSTR lpszThisFile, ULONG& ulSize, LPSTR lpszTimeStamp);
  40. int RemoveSourceDirFromPath(string& strResultPath, string& strRawPath, string& strSourceDir);
  41. void CleanupArrays();
  42. int SafeDirectoryCreate(LPSTR lpszDir);
  43. LPSTR GetFileSizeAsStr(ULONG ulFileSize);
  44. int MakeNewSourcePathWithWildcardMask(string& strNewFullSourcePath, string& strOldFullSourcePath,
  45.                                                   string& strWildcardMask, string& strErrMsg);
  46. int ChangeFileAttributes(LPSTR lpszCurrentDir, ULONG ulNewAttrib);
  47. BOOL RunProgramWithArgs(LPSTR lpszExeName, LPSTR lpszArgs);
  48. #endif
  49.